package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MineQuestionMapper;
import com.ruoyi.system.domain.MineQuestion;
import com.ruoyi.system.service.IMineQuestionService;

/**
 * 题目Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-15
 */
@Service
public class MineQuestionServiceImpl implements IMineQuestionService 
{
    @Autowired
    private MineQuestionMapper mineQuestionMapper;

    /**
     * 查询题目
     * 
     * @param questionId 题目主键
     * @return 题目
     */
    @Override
    public MineQuestion selectMineQuestionByQuestionId(Long questionId)
    {
        return mineQuestionMapper.selectMineQuestionByQuestionId(questionId);
    }

    /**
     * 查询题目列表
     * 
     * @param mineQuestion 题目
     * @return 题目
     */
    @Override
    public List<MineQuestion> selectMineQuestionList(MineQuestion mineQuestion)
    {
        return mineQuestionMapper.selectMineQuestionList(mineQuestion);
    }

    /**
     * 新增题目
     * 
     * @param mineQuestion 题目
     * @return 结果
     */
    @Override
    public int insertMineQuestion(MineQuestion mineQuestion)
    {
        return mineQuestionMapper.insertMineQuestion(mineQuestion);
    }

    /**
     * 修改题目
     * 
     * @param mineQuestion 题目
     * @return 结果
     */
    @Override
    public int updateMineQuestion(MineQuestion mineQuestion)
    {
        return mineQuestionMapper.updateMineQuestion(mineQuestion);
    }

    /**
     * 批量删除题目
     * 
     * @param questionIds 需要删除的题目主键
     * @return 结果
     */
    @Override
    public int deleteMineQuestionByQuestionIds(Long[] questionIds)
    {
        return mineQuestionMapper.deleteMineQuestionByQuestionIds(questionIds);
    }

    /**
     * 删除题目信息
     * 
     * @param questionId 题目主键
     * @return 结果
     */
    @Override
    public int deleteMineQuestionByQuestionId(Long questionId)
    {
        return mineQuestionMapper.deleteMineQuestionByQuestionId(questionId);
    }

    /**
     * 查询总题目数量
     *
     */
    @Override
    public int selectMineQuestionTotalCount() {
        return mineQuestionMapper.selectMineQuestionTotalCount();
    }
}
